package ruide_info_mvc.base.core.exception.customException;

/**
 * 公共基础异常.
 * @ClassName CommonException
 * @Author wangBo
 * @Date 2019/7/6 0006 下午 7:49
 * @Version 1.0
 */
public class CommonException extends BaseException {

    private boolean yesOrNo = true;

    @Override
    protected boolean yesOrNoGoMessage() {
        return yesOrNo;
    }

    /**
     * 功能描述: 如果yesOrNo 设置false,则不会帮你翻译key的值
     * @Author wangBo
     * @Date 2019/7/6 0006 下午 7:51
     **/
    public CommonException(String errorMsg, boolean yesOrNo) {
        super(errorMsg);
        this.yesOrNo = yesOrNo;
    }

    /**
     * 功能描述: 默认配置,会根据key处理value
     * @Author wangBo
     * @Date 2019/7/6 0006 下午 7:51
     **/
    public CommonException(String errorMsg) {
        super(errorMsg);
    }
}